{% extends 'user/base_user.html' %}

{% block ext_js %}
    {{ super() }}
    <script type="text/javascript" src="{{ url_for('static',filename='app/user/js/user_login.js') }}"></script>
    <script type="text/javascript">
        function login() {
            err_name = $('#err_name').val()
            err_password = $('#err_password').val()
            if (err_name) {
                alert(err_name)
            } else if (err_password) {
                alert(err_password)
            }
        }
    </script>
{% endblock %}


{% block content %}
    <input type="hidden" id="err_name" value="{{ name }}"/>
    <input type="hidden" id="err_password" value="{{ password }}"/>
    <div class="container">

        <form method="post" action="" onsubmit="return check_input()">
            {#            {{ form.csrf_token }}#}
            <div class="form-group">
                <label for="exampleInputEmail1">用户</label>
                <input type="text" name="username" class="form-control" placeholder="用户名">
            </div>

            <div class="form-group">
                <label for="exampleInputPassword1">密码</label>
                <input id="password" type="password" name="password" class="form-control" placeholder="密码">
            </div>

            <input type="submit" class="btn btn-success btn-block" value="登录">
        </form>

    </div>

{% endblock %}
